home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1997 November
/
Macworld (1997-11).dmg
/
Shareware World
/
Utilities
/
Disk & File
/
CDFinder 1.5
/
CDFinder & AppleScript
< prev
next >
Wrap
Text File
|
1997-08-18
|
1KB
|
29 lines
-- This is a short sample how to tell CDFinder to create catalog files of all local disks
-- By Norbert M. Doerner 1997
tell application "Finder"
set volumeList to every disk as list
end tell
tell application "CDFinder"
repeat with oneDisk in volumeList
set oneAlias to oneDisk as alias -- CDFinder needs an alias of the disk
with timeout of 500 seconds -- remember: this might take more than the two minutes!
set myResult to create catalog of (oneAlias) -- use standard settings and do not update or duplicate
end timeout
if myResult = -128 then -- then the catalog might be already there
end if
end repeat
end tell
-- PLEASE NOTE:
-- This is the first release of CDFinder with some AppleScript support. Once I have figured out
-- how to add more stuff (like a real object hierarchy) I will add more options.
-- If you have any ideas or suggestions or even better, code samples, please tell me!
-- Secret commands:
-- By opening the preferences file, CDFinder will open the window to let you change the preferences.
-- By opening any catalog file that is stored inside the catalog folder, CDFinder will open it
-- and display its contents.
-- These secret commands will go away once I figure out how to use properties and the
-- get/set data commands.